package com.java.entity;

import java.io.Serializable;
import java.util.Date;

public class Payment implements Serializable {
    private Integer paymentId;

    private Integer userId;

    private String address;

    private String name;

    private Integer postcode;

    private Date createTime;

    private Integer expressNum;

    private Float acmount;

    private String tele;

    private Float depositReturn;

    private static final long serialVersionUID = 1L;

    public Integer getPaymentId() {
        return paymentId;
    }

    public void setPaymentId(Integer paymentId) {
        this.paymentId = paymentId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public Integer getPostcode() {
        return postcode;
    }

    public void setPostcode(Integer postcode) {
        this.postcode = postcode;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getExpressNum() {
        return expressNum;
    }

    public void setExpressNum(Integer expressNum) {
        this.expressNum = expressNum;
    }

    public Float getAcmount() {
        return acmount;
    }

    public void setAcmount(Float acmount) {
        this.acmount = acmount;
    }

    public String getTele() {
        return tele;
    }

    public void setTele(String tele) {
        this.tele = tele == null ? null : tele.trim();
    }

    public Float getDepositReturn() {
        return depositReturn;
    }

    public void setDepositReturn(Float depositReturn) {
        this.depositReturn = depositReturn;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Payment other = (Payment) that;
        return (this.getPaymentId() == null ? other.getPaymentId() == null : this.getPaymentId().equals(other.getPaymentId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPostcode() == null ? other.getPostcode() == null : this.getPostcode().equals(other.getPostcode()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getExpressNum() == null ? other.getExpressNum() == null : this.getExpressNum().equals(other.getExpressNum()))
            && (this.getAcmount() == null ? other.getAcmount() == null : this.getAcmount().equals(other.getAcmount()))
            && (this.getTele() == null ? other.getTele() == null : this.getTele().equals(other.getTele()))
            && (this.getDepositReturn() == null ? other.getDepositReturn() == null : this.getDepositReturn().equals(other.getDepositReturn()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPaymentId() == null) ? 0 : getPaymentId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPostcode() == null) ? 0 : getPostcode().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getExpressNum() == null) ? 0 : getExpressNum().hashCode());
        result = prime * result + ((getAcmount() == null) ? 0 : getAcmount().hashCode());
        result = prime * result + ((getTele() == null) ? 0 : getTele().hashCode());
        result = prime * result + ((getDepositReturn() == null) ? 0 : getDepositReturn().hashCode());
        return result;
    }
}